/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.lucava.boatskeeper.client.event;

import com.google.gwt.event.shared.GwtEvent;
import net.customware.gwt.presenter.client.place.Place;

/**
 *
 * @author glenn
 */
public class UpdatedEvent extends GwtEvent<UpdatedEventHandler> {

    public static Type<UpdatedEventHandler> TYPE = new Type<UpdatedEventHandler>();
    private final Object updated;
    public Place PLACE;

    public UpdatedEvent(Place p, Object updated) {
        this.PLACE = p;
        this.updated = updated;
    }

    public Object getUpdated() {
        return updated;
    }

    @Override
    public Type<UpdatedEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(UpdatedEventHandler handler) {
        handler.onUpdated(this);
    }
}